package com.fzdy.dataplatform.core.common;

import com.fzdy.dataplatform.controller.api.ModuleCallback;

import java.util.List;

public class AjaxCallback {
    private String statusCode = ModuleCallback.SUCCESSNO;
    private String message = ModuleCallback.REQUESTSUCCESS;
    private List list;
    private Long totalRow;
    private Boolean closeCurrent;
    private Object data;
    private String apikey;

    public AjaxCallback() {
    }

    public AjaxCallback(String message) {
        this.message = message;
    }

    public AjaxCallback(String statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    public AjaxCallback(List list, Long totalRow) {
        this.message=null;
        this.statusCode = null;
        this.list = list;
        this.totalRow = totalRow;
    }

    public AjaxCallback(Boolean closeCurrent, String statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
        this.closeCurrent = closeCurrent;
    }
    public AjaxCallback(Boolean closeCurrent) {

        this.closeCurrent = closeCurrent;
    }

    public AjaxCallback(String statusCode, String message, Object data) {
        this.statusCode = statusCode;
        this.message = message;
        this.data = data;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public Long getTotalRow() {
        return totalRow;
    }

    public void setTotalRow(Long totalRow) {
        this.totalRow = totalRow;
    }

    public Boolean getCloseCurrent() {
        return closeCurrent;
    }

    public void setCloseCurrent(Boolean closeCurrent) {
        this.closeCurrent = closeCurrent;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getApikey() {
        return apikey;
    }

    public void setApikey(String apikey) {
        this.apikey = apikey;
    }
}
